package top.kaoshanji.t1ch10c.controllers;

import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;
import top.kaoshanji.t1ch10c.model.PaymentDetails;
import top.kaoshanji.t1ch10c.service.PaymentService;

/**
 * @author kaoshanji
 * ^_^
 * create time 2025/4/30 19:33
 */
@RestController
public class PaymentController {

    private final PaymentService paymentService;

    public PaymentController(PaymentService paymentService) {
        this.paymentService = paymentService;
    }

    @PostMapping("/makePayment")
    public PaymentDetails makePayment() {
        return paymentService.processPayment();
    }

}
